#include <stdio.h>
int main(int argc,char *argv[])
{
	if(argc < 3)
	{
		printf("parameter error\n");
		return 1;
	}
	FILE *left_file = fopen(argv[1],"r");
	if(left_file == NULL)
	{
		printf("file doesn`t exist\n");
		return 1;
	}
	FILE *right_file = fopen(argv[2],"w");
	if(right_file == NULL)
	{
		printf("file doesn`t exist\n");
		return 1;
	}
	char c = fgetc(left_file);
	while(c != EOF)
	{
		c = fgetc(left_file);
		fputc(c,right_file);
	}
	if(fclose(left_file) == -1)
	{
		printf("fail to close file\n");
		return 1;
	}
	if(fclose(right_file) == -1)
	{
		printf("fail to close file\n");
		return 1;
	}
	printf("success\n");
	return 0;
}
